#pragma once
#include "FileTexture.h"
#define  RESOURCE_TYPE_VOLUMETEXTURE 13
class WPENGIN_API CVolumeTexture:  public CFileTexture
{
public:
	CVolumeTexture  (const TCHAR * resName,const TCHAR * szFilePath, 	D3DPOOL pool = D3DPOOL_DEFAULT,D3DCOLOR dwColorKey = 0);
	virtual HRESULT OnD3D9ResetDevice( IDirect3DDevice9* pd3dDevice );
	virtual void OnD3D9LostDevice();
	virtual LPDIRECT3DBASETEXTURE9 GetTexture();
private:
	IDirect3DVolumeTexture9 * m_pVolumeTexure; 
 


public:
#pragma region UnitTest
#ifdef _DEBUG

public:

#pragma region UnitTest
#ifdef _DEBUG
	class GameUnitTest :  public ITerminate ,public IInitialize,public IRenderable,public ID3DDeviceStateDeposit
	{
		void  OnTerminate( void );
		HRESULT  OnInitialize( void );

		virtual void OnD3D9FrameRender( float fElapsedTime );

		virtual HRESULT OnD3D9ResetDevice( IDirect3DDevice9* pd3dDevice );

		virtual void OnD3D9LostDevice();

		CVolumeTexture * m_pVolumeTexure;
		  LPDIRECT3DVERTEXBUFFER9  m_pVB;
		D3DXMATRIX  m_matWorld,m_matView,m_matProj;
		CVertexBuffer * m_pVertexBuffer;
	};
public:
	static void UnitTest();

#endif // _DEBUG
#pragma endregion UnitTest

#endif // _DEBUG
#pragma endregion UnitTest


	

};